 <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page isELIgnored="false"%>
<%@ include file="../common/taglibs.jsp"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<title>商户大额交易查询</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<link href="<s:url value="/css/a.css"/>" type="text/css"
	rel="stylesheet" />
<link href="<s:url value="/css/index.css"/>" type="text/css"

	rel="stylesheet" />
	
<script type="text/javascript"
	src="<s:url value="/js/jquery-1.9.1.min.js" />"></script>
<script type="text/javascript" src="<c:url value="/js/common.js" />"></script>
<script language="javascript" type="text/javascript"
	src="<c:url value="/js/My97DatePicker/WdatePicker.js"/>"></script>

<style>
　　　
a{
	text-decoration: none
}

a:link{
text-decoration:none;
}
a:visited{
text-decoration:none;
}
a:hover{
text-decoration:none;
}
a:active{
text-decoration:none;
}
　　


　　　
</style>

<script type="text/javascript">
$(document).ready(function() {	
	     // alert("1dd");
	     // startRequest();  
          setInterval("startRequest()", 5000);  
			});
			
    function startRequest() {  
       // alert("dd");
       var flag=$("#flag").val();
        if(flag==1){
        	 $("#queryUserForm").attr("action","${rootPath}/bigEstrnHisQuery/queryBigEstrnHis.ct?").submit();
        }
       
    
    }  
			function   str2date(str){   
			  var   d=null;   
			  var   reg=/^(\d{4})(\d{2})(\d{2})$/  ;
			  if(arr=str.match(reg))d=new   Date(Number(arr[1]),Number(arr[2])-1,Number(arr[3])) ; 
			  return   d;   
			  }
			  
			  function subForm() {
				var endTime = $("#maxDate").val();
				var beginTime = $("#minDate").val();
		
				if (!endTime || !beginTime) {
					alert("起始时间范围必须选择!");
					return false;
				}
				var date1 = str2date(beginTime);
				var date2 = str2date(endTime);
		
				if (date1.getMonth() != date2.getMonth()) {
					alert("选择的起始时间不在同一个月内！");
					return false;
				}
				return true;
			}



	function trim(str){   
    str = str.replace(/^(\s|\u00A0)+/,'');   
    for(var i=str.length-1; i>=0; i--){   
        if(/\S/.test(str.charAt(i))){   
            str = str.substring(0, i+1);   
            break;   
        }   
    }   
    return str;   
}  
</script>



</head>

<body>

	<div class="subpage">
		<s:form id="queryUserForm" action="/bigEstrnHisQuery/queryBigEstrnHis.ct" method="post"
			theme="simple">
			<div class="user_title">
	    		 <h2 class="headline-inquires">POS收单运营管理平台<br />
	    		 <span class="sub-title">POS Trade Operation Management Platform

	    		 </span></h2>
	    		</div>
			<table width="100%" cellpadding="0" cellspacing="0" border="0"
				class="query_table">

				<tr>
					<td colspan="4" align="center">
						<h2 class="headline-inquires">
							商户大额交易查询<br />
							<span class="sub-title"></span>
						</h2><s:hidden id="flag" name="flag" />

					</td>
				</tr>


				<tr>
					<td colspan="4">&nbsp;</td>
				</tr>


               <tr>
					
					<td align="right" width="10%">交易起始日期：</td>
					<td align="left"  colspan="1" width="40%">
					<s:textfield    onfocus="WdatePicker({dateFmt:'yyyyMMdd',readOnly:true,wdate:true,errDealMode:0});"  cssClass="queryWidth" id="minDate"  name="searchCondition.minDate" />
					-
					<s:textfield  onfocus="WdatePicker({dateFmt:'yyyyMMdd',readOnly:true,wdate:true,errDealMode:0});"  cssClass="queryWidth" id="maxDate"  name="searchCondition.maxDate"  />
					</td>
					<td align="right">交易金额范围：</td>
					<td align="left" colspan="1">
					<s:select cssClass="queryWidth" name="searchCondition.range"
								id="moneyRange"
								list="#{'0':'不限','1':'1-2万','2':'2-3万','3':'3-4万','4':'4万以上'}"  />元  
				</tr> 
				
				
				<tr>
					<td align="right" >商户号：</td>
					<td align="left" ><s:textfield id="merNo"
							name="searchCondition.merchantNo" cssClass="queryWidth" /></td>
					<td align="right" >终端号：</td>
					<td align="left" ><s:textfield id="etsterMid"
							name="searchCondition.etsterMid" cssClass="queryWidth" /></td>
				</tr>
				
				<tr>
						<td colspan="4" align="center"><span style="color: red"><s:actionerror /></span>
							<span style="color: red;"><s:actionmessage /></span > <span style="color: red;"><s:fielderror
									cssClass="fieldError" /></span>
							<span id="otherError"></span>
						</td>
					</tr>
				<tr>
					<td colspan="4" align="right"><s:submit id="subForm" value="查   询" />
						&nbsp;&nbsp;&nbsp;&nbsp; <s:reset value="取  消" />&nbsp;&nbsp;&nbsp;&nbsp; </td>
				</tr>
			
				
			</table>
			<table width="100%" cellpadding="0" cellspacing="0" border="0">

				<tr>
					<td colspan="4" align="center">
						<h2 class="headline-inquires">交易记录</h2>

					</td>
				</tr>
				<s:if
					test="#request.searchRsList != null && #request.searchRsList.size>0">
					<tr>
						<td align="left">&nbsp;&nbsp;&nbsp;&nbsp; <page:pageCount
								max_pages="11" totalPage="${requestScope.totalPage}"
								currentPage="${requestScope.currentPage}"
								action="${rootPath}/bigEstrnHisQuery/queryBigEstrnHis.ct?currentPage=" />

						</td>
					</tr>
				</s:if>
			</table>
			<table id="tableList" width="100%" class="table">
				<thead>
					<tr>
						<!-- <th>选择</th> -->
						<th>商户号</th>
						<th>商户名</th>
						<th>银行卡号</th>
						
						<th>终端号</th>
						<th>mcc码</th>
						<th>营业起始时间</th>
						<th>营业终止时间</th>
						<th>交易金额（元）</th>
					
					
						<th>交易日期</th>
						
						
					</tr>
				</thead>
				<tbody>
					<s:iterator value="#request.searchRsList" status="stat" id="estrn">
							<tr class="<s:if test="#stat.index%2==0">tr_0</s:if>" >
							<%-- <td align="center">
								<s:checkboxlist name="multi_sel" list="#{#estrn.merNo:''}"  theme="simple" />
					        </td> --%>
					        <td>
							<s:property value="#estrn.merNo"/>
							</td>
							<td>
							<s:property value="#estrn.merName"/>
							</td>	
							<td>
							<s:property value="#estrn.account"/>
							</td>	
							<td>
							<s:property value="#estrn.etsterMid"/>
							</td>	
							<td>
							<s:property value="#estrn.mcc"/>
							</td>
							<td>
							<s:property value="#estrn.engName"/>
							</td>
							<td>
							<s:property value="#estrn.engBrName"/>
							</td>
					        <td align="right">
					        <page:amount amount="${estrn.amount/100}"/>
							</td>
						
							<td>
							<s:property value="#estrn.etsDate"/>
							</td>
						    </tr>
						</s:iterator>
				</tbody>
			</table>
		</s:form>
	</div>
	<s:if test="#request.msg !=null">
		<script language="javascript">
			alert("${request.msg}");
		</script>
	</s:if>
</body>
</html>
